<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head> 
  <meta property="qc:admins" content="542536566763012535145636" /> 
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  <title>注册 - 享笑网</title> 
  <meta name="keywords" content="征文,有奖征文,征文比赛,征文比赛网,有奖征文网,征文大赛,小清新图片,每日一笑,把耳朵叫醒,享笑网" /> 
  <meta name="description" content="享笑网是紧贴生活的小清新网站，近期上线的有奖征文比赛更是受到了大家的热捧，给一些热爱写作的网友提供了一个很好的平台。享笑网的宗旨是分享笑，分享爱，让更多的人在欢声笑语下得到爱的滋润为其永恒不变的主题。网站提供时下每周一期的有奖征文，小清新图片、原创文章，搞笑段子。致力打造一片供人们心灵交流的绿洲。" /> 
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/common.css" /> 
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/public.css" /> 
  <script type="text/javascript" src="__PUBLIC__/home/js/jq.js"></script> 
  <script type="text/javascript" src="__PUBLIC__/home/js/ss.js"></script> 
  <script type="text/javascript">
function getBrowser()
{  
   var OsObject = "";  
   if(navigator.userAgent.indexOf("MSIE")>0) {  
    var browser=navigator.appName;
    var b_version=navigator.appVersion; 
    var version=b_version.split(";"); 
    var trim_Version=version[1].replace(/[ ]/g,""); 
    if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0") 
    { 
      return("IE6"); 
    } 
    else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0") 
    { 
      return("IE7"); 
    } 
    else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE8.0") 
    { 
      return("IE8"); 
    } 
    else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE9.0") 
    { 
      return("IE9"); 
    }
    else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE10.0") 
    { 
      return("IE10"); 
    }
   }  
   if( navigator.userAgent.indexOf("Firefox")>0){  
        return "Firefox";  
   }
   if( navigator.userAgent.indexOf("Chrome")>0){  
        return "Chrome";  
   }
   if( navigator.userAgent.indexOf("Opera")>0){  
        return "Opera";  
   } 
   if( navigator.userAgent.indexOf("Safari")>0) {  
        return "Safari";  
   }
   return 'Others';  
} 
(function(){
  vars = {};
  vars.browser = getBrowser();
  vars.hello_ketty = "heimao";
  vars.jsUrl = "http://www.sharesmile.cn/js/";
  vars.homeUrl = 'http://www.sharesmile.cn/';
  vars.siteName = '享笑网 - www.ShareSmile.cn - 享你所想,享你所笑';
  vars.publicUrl = "/public/";
  vars.showgirlUrl = "/user#showgirl";
  vars.userid = '';
  vars.username = '享笑观众';
  vars.nickname = '享笑观众';
  vars.gender = 0;
  vars.PHPSESSID = "3qtfvrs5dj7fje5e4psk15k4c2";
  vars.ajaxSubmiting = false;
  vars.sysImageUrl = '/public/system/';
  vars.qingImageUrl = '/public/qing/';
  vars.headImageUrl = '/public/userhead/';
  vars.postImageUrl = '/public/post/';
  vars.essayImageUrl = '/public/essay/';
  vars.jokesImageUrl = '/public/jokes/';
  vars.showgirlImageUrl = '/public/showgirl/';
  vars.photoImageUrl = '/public/photo/';
  vars.commStatUrl = '/Stat/stat';
  vars.cookieUMessage = 'HASMESSAGE'+vars.userid;
  vars.voteBlankColor = new Array( '#5DBBEF', '#95E62A', '#CC1CD9', '#FFCD10', '#F79395');
  var d = new Date();
  vars.todayTimeString = 20160122;
})();
</script>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/login.css" /> 
 </head> 
 <body> 
  <img class="log-bg" src="__PUBLIC__/home/images/bg2.jpg" alt="享笑网LOGO" /> 
  <div class="log-container"> 
   <div class="log-main pb-after-clear pb-opac90"> 
    <div class="log-box pb-after-clear"> 
     <div class="log-logo  pb-login pb-fl" style="margin-top:50px;"> 
      <a title="前往享笑网首页" href="index.html"><i class="pb-icons logo"></i></a> 
      <span class="pb-iblock pb-mt50">使用合作账号快速注册</span> 
      <br /> 
      <a class="pb-mt10 pb-iblock" href="/site/qqlogin"> <i class="pb-icons qq"></i> </a> &nbsp; 
      <a class="pb-mt10 pb-iblock" href="/site/weibologin"> <i class="pb-icons weibo"></i> </a> 
     </div> 
     <div class="log-fields pb-fr"> 
      <form id="register-form" action="" method="post"> 
       <table cellspacing="0" cellpadding="0" class="pb-login"> 
        <tbody> 
         <tr> 
          <td> <h3>注册</h3> &nbsp;&nbsp;|&nbsp;&nbsp; 已有账号？ <a href="{:U('Login/index')}">立即登录</a> </td> 
         </tr> 
         <tr> 
          <td> <input class="txt {required:true,isUserName:true,minlength:5}" placeholder="账号 推荐使用常用邮箱" name="UserUser[username]" id="UserUser_username" type="text" maxlength="32" /> <br /><span class="pb-error pb-hide">未完成</span> </td> 
         </tr> 
         <tr> 
          <td> <input class="pb-mt15 txt {required:true,minlength:1}" placeholder="昵称 默认与账号相同" name="UserUser[nickname]" id="UserUser_nickname" type="text" maxlength="12" /> <br /><span class="pb-error pb-hide">未完成</span> </td> 
         </tr> 
         <tr> 
          <td> <input class="pb-mt15 txt" placeholder="密码 6至16个字符之间" name="UserUser[password]" id="UserUser_password" type="password" maxlength="16" /> <br /><span class="pb-error pb-hide">未完成</span> </td> 
         </tr> 
         <tr> 
          <td> <input class="pb-mt15 txt" placeholder="确认 与前者保持一致" name="UserUser[rePassword]" id="UserUser_rePassword" type="password" /> <br /><span class="pb-error pb-hide">未完成</span> </td> 
         </tr> 
         <tr> 
          <td><button type="button" id="registerButton" class="pb-icons pb-mt15"><u>注册</u></button></td> 
         </tr> 
         <tr> 
          <td> </td> 
         </tr> 
        </tbody> 
       </table> 
      </form> 
     </div> 
     <script>
function ischinese(s){
  var ret=true;
  for(var i=0;i<s.length;i++)           //遍历每一个文本字符
      ret=ret && (s.charCodeAt(i)>=10000);//判断文本字符的unicode值
  return ret;
} 
$(document).ready(function(){
  commonLib.fixPlaceholder();
  var username      = $("#UserUser_username");
  var nickname      = $("#UserUser_nickname");
  var password      = $("#UserUser_password");
  var rePassword    = $("#UserUser_rePassword"); 
  $("#registerButton").click(function(){
    var usernameObj   = $("#UserUser_username").val();
    var nicknameObj   = $("#UserUser_nickname").val();
    var passwordObj   = $("#UserUser_password").val();
    var rePasswordObj = $("#UserUser_rePassword").val();
    var str = document.getElementById("UserUser_username").value
    var val= ischinese(str);               //判断是否包含中文
    if (val) {
        var msg = '只允许字母和数字下划线点等的组合或邮箱地址';
        username.parent().find('.pb-error').html( msg).show();
        return false;
    };
    if( $("#UserUser_username").val() == ''){
      var msg = '您还未完成用户名填写哦！';
      username.parent().find('.pb-error').html( msg).show();
      return false;
    };

    if($("#UserUser_username").val().length < 5 || $("#UserUser_username").val().length >20) {
      var msg = '请输入在5~12个字母数字下划线之内的账号';
      username.parent().find('.pb-error').html( msg).show();
      return false;
    }

    if( $("#UserUser_nickname").val() == ''){
      var msg = '您的昵称未输入！';
      nickname.parent().find('.pb-error').html( msg).show();
      return false;
    }

    if( $("#UserUser_password").val() == ''){
      var msg = '您还未完成密码输入哦';
      password.parent().find('.pb-error').html( msg).show();
      return false;
    }
     if( $("#UserUser_password").val().length < 6 || $("#UserUser_username").val().length >16){
      var msg = '请输入6~16的密码长度';
      rePassword.parent().find('.pb-error').html( msg).show();
      return false;
    }

    if( $("#UserUser_rePassword").val() == ''){
      var msg = '您还未完成确认密码哦！';
      rePassword.parent().find('.pb-error').html( msg).show();
      return false;
    }
    if ($("#UserUser_rePassword").val() != $("#UserUser_password").val()) {
      var msg = '您二次输入的密码不一致哦';
      rePassword.parent().find('.pb-error').html( msg).show();
      return false;
    } 
    $.post("{:U('Login/add')}",{user_name:usernameObj,nick_name:nicknameObj,pass_word:passwordObj,rePass_word:rePasswordObj},function(data){
      if (data == 1) {
        var msg = '您系统错误';
        rePassword.parent().find('.pb-error').html( msg).show();
        return false;
      }else if(data == 2) {
        var msg = '您二次输入的密码不一致哦!';
        rePassword.parent().find('.pb-error').html( msg).show();
        return false;
      }else if ( data == 3) {
        var msg = '该用户名或者邮箱已经存在!';
        username.parent().find('.pb-error').html( msg).show();
        return false;
      }else{
          var resw = data.substr(0,1);
          var url = data.substring(2);
          if (resw == 4) {
            alert("恭喜你注册成功");
            window.location.href = url;
          };
      }
    });
  
  });
});
</script> 
    </div> 
   </div> 
  </div> 
  <script language="javascript" type="text/javascript" src="__PUBLIC__/home/js/15502332.js"></script> 
  <noscript>
   <a href="http://www.51.la/?15502332" target="_blank"><img alt="我要啦免费统计" src="__PUBLIC__/home/images/15502332.asp" style="border:none" /></a>
  </noscript> 
  <!-- Baidu Button BEGIN --> 
  <script type="text/javascript" id="bdshare_js" data="type=slide&amp;img=8&amp;pos=right&amp;uid=6614812"></script> 
  <script type="text/javascript" id="bdshell_js"></script> 
  <script type="text/javascript">
  document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
  </script> 
  <!-- Baidu Button END --> 
  <script type="text/javascript" language="javascript">
  $(document).ready(function(){
    Sys.showLoginDiv( null, false);
    
    commonLib.preLoadImage( $('.log-bg').attr('src'), function(){
      $('.log-bg').fadeIn(2000);
    });
    Sys.hide51();
  });
  </script> 
  <script type="text/javascript" src="__PUBLIC__/home/js/form.js"></script>  
 </body>
</html>